package com.wf.course.service.impl;


import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.utils.page.PageBean;
import com.wf.course.dao.ICouponsMapper;
import com.wf.course.model.ad.Coupons;
import com.wf.course.service.ICouponsService;

@Service
@Transactional
public class ICouponsServiceImpl implements ICouponsService {

	@Override
	public List<Coupons> getCouponsAllList() {
		// TODO Auto-generated method stub
		return mapper.getCouponsAllList();
	}
	
	@Autowired
	private ICouponsMapper mapper;
	
	@Override
	public void getCouponsList(PageBean<Coupons> pageBean) {
		// TODO Auto-generated method stub
		pageBean.setResults(mapper.getCouponsList(pageBean));
		pageBean.setTotalCount(mapper.getCouponsCount(pageBean));
	}

	@Override
	public Coupons getCoupons(Integer id) {
		// TODO Auto-generated method stub
		return mapper.getCoupons(id);
	}

	@Override
	public void saveCoupons(Coupons coupons) {
		// TODO Auto-generated method stub
		mapper.saveCoupons(coupons);
	}

	@Override
	public void updateCoupons(Coupons coupons) {
		// TODO Auto-generated method stub
		mapper.updateCoupons(coupons);
	}

	@Override
	public void deleteCoupons(Integer id) {
		// TODO Auto-generated method stub
		mapper.deleteCoupons(id);
	}
}
